package com.csq.service.impl;

import com.csq.entity.User;
import com.csq.mapper.UserMapper;
import com.csq.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author ercai
 * @date 2019/7/18 - 14:28
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    public User findById(Integer id) {
        return userMapper.findById(id);
    }

    public User selectByParentId(Integer parentId) {
        return userMapper.selectByParentId(parentId);
    }

    public void insert(User user) {
        userMapper.insert(user);
    }

    public String add(int a, String b) {

        //int i = 1/0;
        return "success";
    }
}
